﻿namespace FFF.Test.Application.AppServices.PublicService.Token
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using Abp.Application.Services.Dto;
    using Abp.AutoMapper;
    using FFF.Test.Entity.FW;
    using FFF.Test.Entity.FW.View;

    /// <summary>
    /// 99.002 接口用户登录(于大明)输入dto
    /// </summary>
    public class InterfaceUserLoginInDto
    {
        /// <summary>
        /// 登录用户名
        /// </summary>
		[Display(Name = "登录用户名", Description = "登录用户名")]
        [Column("InterfaceLoginCode")]
        [StringLength(128)]
        public string InterfaceLoginCode { get; set; }

        /// <summary>
        /// 登录密码
        /// </summary>
        [Display(Name = "登录密码", Description = "登录密码")]
        [Column("InterfaceLoginPwd")]
        [StringLength(256)]
        public string InterfaceLoginPwd { get; set; }
    }

    /// <summary>
    /// 99.002 接口用户登录(于大明)输出dto
    /// </summary>
    public class InterfaceUserLoginOutDto
    {
        /// <summary>
        /// 接口用户表GUID
        /// </summary>
        [Display(Name = "接口用户表GUID", Description = "接口用户表GUID")]
        [Column("InterfaceUserGUID")]
        public Guid Id { get; set; }

        /// <summary>
        /// 登录用户名
        /// </summary>
        [Display(Name = "登录用户名", Description = "登录用户名")]
        [Column("InterfaceLoginCode")]
        [StringLength(128)]
        public string InterfaceLoginCode { get; set; }

        /// <summary>
        /// 用户名称
        /// </summary>
        [Display(Name = "用户名称", Description = "用户名称")]
        [Column("InterfaceName")]
        [StringLength(64)]
        public string InterfaceName { get; set; }

        /// <summary>
        /// 过期时间(分钟)
        /// </summary>
        [Display(Name = "过期时间(分钟)", Description = "过期时间(分钟)")]
        [Column("ExpiryTime")]
        public int? InterfaceUserExpiryTime { get; set; }

        /// <summary>
        /// 登陆的Id(int)值
        /// </summary>
		[Display(Name = "登陆的Id(int)值", Description = "登陆的Id(int)值")]
        [Column("LoginId")]
        public int? InterfaceUserLoginId { get; set; }

        /// <summary>
        /// Gets or sets the user identifier.
        /// </summary>
        /// <value>The user identifier.</value>
        /// <remarks>于大明</remarks>
        public string UserId { get; set; }

        /// <summary>
        /// 角色的信息
        /// </summary>
        public List<RolesDto> RolesDtos { get; set; }
    }

    /// <summary>
    /// 角色的dto
    /// </summary>
    public class RolesDto
    {
        /// <summary>
        /// 角色code
        /// </summary>
        [Display(Name = "角色code", Description = "角色code")]
        [Column("ur16002")]
        [StringLength(64)]
        public string InterfaceRoleCode { get; set; }

        /// <summary>
        /// 角色名称
        /// </summary>
        [Display(Name = "角色名称", Description = "角色名称")]
        [Column("UR16003")]
        [StringLength(256)]
        public string InterfaceRoleName { get; set; }
    }
}
